Calculate average velocity